Most apps manage data as JavaScript objects. For example, data like user info, images, documents, contacts, etc, might be fetched from disk or a remote API, and then stored in-memory as JavaScript objects. It's up to us to figure out how we want manage these JavaScript objects, and propagate them into our React components. If the user can edit this data, we also need to figure out how to sync any changes back to where the data was stored originally.

There are several ways to manage data throughout an app, and the best choice depends on the complexity of an app. When in doubt, start simple, and as your application grows in complexity, use something more advanced.

## Common options for managing data

Here are a few options worth considering for managing your data.

<!-- prettier-ignore -->
| Option | Description |
| --- | --- |
| **useReducer** | React provides a hook for storing data. This is a great place to start. |
| **Redux** | [Redux](https://facebook.github.io/react-native/docs/getting-started.html) provides a `store` object which maintains the application state, and can notify our React components when state changes. Redux was designed with React in mind, and has official React bindings: [React Redux](https://github.com/reactjs/react-redux). There are additional tools around Redux to provide: control over asynchronous events, data persistence (for offline usage, etc), and more powerful debugging. |
| **MobX** | State management through "functional reactive programming". [MobX](https://mobx.js.org/README.html) was designed for use with React, and provides utilities like observables to manage state changes.
| **Realm** | The [Realm](https://realm.io/docs/react-native/latest/) library uses a custom database, written from scratch in C to be compatible on both iOS and Android. Realm is suitable for apps with a tremendous amount of data (10,000+ records). If an app can't fit all its data in RAM, using a database makes it easy to page records in and out, or search without loading all data into memory.
